<script setup lang="ts">
// 树形组件所需的数据结构
interface Tree {
  title: string;
  children?: Tree[];
}

const data: Tree[] = [
  {
    title: "阿里",
    children: [
      {
        title: "支付宝",
        children: [
          { title: "花呗" },
          { title: "借呗" },
          { title: "xxx" },
          { title: "xx" },
        ],
      },
      { title: "蚂蚁金服" },
      { title: "天猫" },
      { title: "淘宝" },
    ],
  },
  {
    title: "腾讯",
    children: [
      { title: "QQ音乐" },
      { title: "腾讯视频" },
      { title: "微信" },
      { title: "微信阅读" },
    ],
  },
  { title: "华为" },
];
</script>

<template>
  <div class="car-area-page">
    <!-- 
      el-tree 树形组件
        show-checkbox
        default-expand-all
        
    -->
    <el-tree
      :data="data"
      show-checkbox
      default-expand-all
      :props="{ label: 'title' }"
    />
  </div>
</template>

<style lang="scss" scoped></style>
